package com.etalk.crm.utils;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @Auther: James
 * @Date: 2019/3/26 10:00
 * @Description:
 */
public class SendMessage {
    protected static final Logger logger = LogManager.getLogger(SendMessage.class);

    /**
    * 正式服微信接口地址
    */
   public static final String WEIXIN_URL = "http://weixin.etalk365.com/send/";
     /**
	     * 注册成功提醒（发送给推荐人）
	     * @param id 学生名称  获得积分 accessToken 推送人名称
	     * */
    public static void send_register_message(String id,String stuName,String accessToken,String score,String name) {
        logger.info("调用注册成功提醒（发送给推荐人）接口==========");
        try{
            String url = WEIXIN_URL+"send_register_message?id="+id+"&stuName="
                    +stuName+"&accessToken="+accessToken+"&score="+score
                    +"&name="+name;
            String result = WeiXinUtil.httpRequestString(url);
            logger.info(id+"========="+result);
        }catch(Exception e){
            logger.info(e.getMessage());
        }
    }
}
